from pymongo import MongoClient
import re

s = "#毫无分纤箱#"
ss = re.search('#(.*?)#', s).group(1)
print(ss)
client = MongoClient(host="127.0.0.1",port=27017)
db = client["test123"]

collection = client["test123"][ss]
result = collection.insert_one({"name":"xiaowang","age":10})
print(result)

collection_list = db.list_collection_names()
print(collection_list)
client.close()